<!DOCTYPE html>
<html>
  <head>
    <title></title>
    <link rel='stylesheet' href='/stylesheets/style.css' />
  </head>
  <body>
    <div id="container" style="height: 90%; width: 90%; margin: 0 auto"></div>
    <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
    <script src="http://cdn.hcharts.cn/highcharts/highcharts.js"></script>
    <script>
      $.get('/get/data',function(data,status){
        if(status == 'success'){
          Highcharts.setOptions({
            lang: {
              resetZoom: "返回",
              resetZoomTitle: "回到初始状态"
            }
          });
          console.time('line');
          Highcharts.chart('container', {
            chart: {
              zoomType: 'x'
            },
            credits: {
              enabled: false
            },
            boost: {
              useGPUTranslations: true
            },
            title: {
              text: data.length + '个点'
            },
            xAxis: {
              title: {
                text: 'x点',
                align: 'high'
              }
            },
            yAxis: {
              title: {
                text: 'y点',
                align: 'high'
              }
            },

            tooltip: {
              valueDecimals: 2
            },
            series: [{
              name: '线',
              data: data,
              lineWidth: 0.5
            }]
          });
          console.timeEnd('line');
        }
      })

    </script>
  </body>
</html>
